//
//  TravelDetailModel.m
//  MemoryTravel
//
//  Created by dllo on 15/12/26.
//  Copyright © 2015年 fcx. All rights reserved.
//

#import "TravelDetailModel.h"

@implementation TravelDetailModel

-(void)setValue:(id)value forKey:(NSString *)key{

    [super setValue:value forKey:key];

    if ([key isEqualToString:@"nodes"]) {

        NSMutableArray *array = [NSMutableArray array];

        for (NSMutableDictionary *dic in value) {

            TravlesDetailModel *nodes = [[TravlesDetailModel alloc] init];

            [nodes setValuesForKeysWithDictionary:dic];

            [array addObject:nodes];

        }

        self.nodes = [NSMutableArray arrayWithArray:array];
    }
}
@end
